package net.techwatch.jpa.dao;

/**
 * @author Vincent Partington
 * 
 * For more details look at the article <a
 * href="http://blog.xebia.com/2009/03/09/jpa-implementation-patterns-data-access-objects/">JPA
 * implementation patterns: Data access objects</a>
 * 
 * @param <K>
 * @param <E>
 */
public interface Dao<K, E> {

	/**
	 * @param entity
	 */
	void persist(E entity);

	/**
	 * @param entity
	 */
	void remove(E entity);

	/**
	 * @param id
	 * @return
	 */
	E findById(K id);
}
